package com.zhongge.observer;

/**
 * @ClassName Client
 * @Description TODO 测试代码
 * @Author zhongge
 * @Version 1.0
 */
public class Client {
    public static void main(String[] args) {
        //创建商品对象
        Product phone = new Product("手机", 1000);
        //会员1
        Member m1 = new ShopMember("03257");
        //会员2
        Member m2 = new ShopMember("03258");

        //注册会员
        phone.registerMember(m1);
        phone.registerMember(m2);

        //修改商品价格触发通知
        phone.setPrice(2000);
    }
}
